package com.linkage.lcims.base.dao.business.impl;

import com.linkage.lcims.base.dao.HibernateBaseDAOImpl;
import com.linkage.lcims.base.dao.business.interfaces.GroupAuthenDAO;
import com.linkage.lcims.base.po.business.BdGroupAuthen;
import com.linkage.util.exception.DAOException;

/**
 * @author Owner
 * @date 2008-1-7 TODO To change the template for this generated type comment go
 *       to Window - Preferences - Java - Code Style - Code Templates
 * @version 1.0
 */
public class GroupAuthenDAOImpl extends HibernateBaseDAOImpl implements
		GroupAuthenDAO {

	public int deleteGroupAuthen(Integer groupid) throws DAOException {
		try {
			StringBuffer sql = new StringBuffer();
			sql.append("delete BD_GROUP_AUTHEN where groupid=").append(groupid);
			return this.deleteBySql(sql.toString());
		} catch (Exception e) {
			throw new DAOException(e, this.getClass());
		}
	}

	public void deleteGroupAuthen(BdGroupAuthen groupAuthen)
			throws DAOException {
		super.delete(groupAuthen);
	}

	@SuppressWarnings("unchecked")
	public java.util.List<BdGroupAuthen> getAll() throws DAOException {
		return super.getAll(BdGroupAuthen.class);
	}

	public void saveGroupAuthen(BdGroupAuthen groupAuthen) throws DAOException {
		super.save(groupAuthen);
	}

	public void updateGroupAuthen(BdGroupAuthen groupAuthen)
			throws DAOException {
		super.merge(groupAuthen);
		
	}

}
